﻿using Dither.VersionSelector.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Dither.VersionSelector.Views
{
    /// <summary>
    /// Interaction logic for CreateRuleTreeView.xaml
    /// </summary>
    public partial class CreateRuleTreeView : Elysium.Controls.Window
    {
        public CreateRuleTreeView()
        {
            InitializeComponent();
        }

        private void ListBox_Drop(object sender, DragEventArgs e)
        {
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false);

            CreateRuleTreeViewModel viewModel = DataContext as CreateRuleTreeViewModel;
            foreach (string fileName in files)
            {
                viewModel.RecommendedPrograms.Add(new Models.ExecutableItem(fileName));
            }
        }
    }
}
